Skip to content

Conversation

@omjego
Copy link
Owner

@omjego omjego commented Oct 7, 2020

This PR has changes for integrating cpp-httplib with oss-fuzz.

PR in oss-fuzz: omjego/oss-fuzz#1 (Will be merged after some minor changes in Dockerfile)

Have made following changes after referring to this guide:

  1. Add fuzz target to fuzz test server code.
  2. Add seed corpus and dictionary to help libFuzz generate meaningful inputs
  3. Added new targets (server_fuzzer) in Makefile for easier integration with oss-fuzz
  4. Add a standalone server fuzz target runner to reproduce bugs reported by oss-fuzz locally.

Usage:

cd test
make fuzz_test 

or run

make all

TODO:
While generating fuzz target binaries OSS-Fuzz requires you to link all your dependencies statically , I was able to do that with openssl but faced some issues with brotli. zlib was available for dynamic linking. Right now only openssl and zlib support is added for fuzz testing.

* Add fuzz_test option to Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants